/**
 * Application.java
 * Purpose: Save information about person in the database.
 *
 * @author Ahmed Salem
 */
package model.integration;

import java.util.Date;
import java.util.List;
import model.dto.ApplicationDTO;


/**
 *
 * @author Ahmed Salem
 */
public class Application implements ApplicationDTO{
    private String name;
    private String surname;
    private String ssn;
    private String email;
    private List<DateList> dateList ;//(List<Date>, List<Date>);
    private Date fromDate;
    private Date toDate;
    private List<CompetenceList> competence;
    private Double yearsOfExperience;
    
    /** 
    * Class constructor
    */ 
    public Application(){
    
    }
    
    /**
    * Class constructor specifying name, surname, ssn, email, fromDate, toDate, competence and yearsOfExperience
    * @param name 
    * @param surname
    * @param yearsOfExperience
    * @param ssn 
    * @param email
    * @param dList
    * @param competence  
    */ 
    public Application(String name,String surname,String ssn, String email,List<DateList> dList,List<CompetenceList> competence,Double yearsOfExperience){
    
      this.name = name;
      this.surname = surname;
      this.ssn = ssn;
      this.email = email;
      this.dateList = dList;
      this.competence = competence;
      this.yearsOfExperience = yearsOfExperience; 
    
    }
    //****  The getters starts here  *****/ 
    
    /**
    * Gets the persons name.
    * @return the name of the person
    */
    @Override
    public String getName(){
        
        return name;
    }
    
    /**
    * Gets the persons surname.
    * @return the surname of the person
    */
    @Override
    public String getSurname(){
        
        return surname;
    }
    
    /**
    * Gets the persons SSN.
    * @return the SSN of the person
    */
    @Override
    public String getSSN(){
        
        return ssn;
    }
    
    /**
    * Gets the persons email.
    * @return the email of the person
    */
    @Override
    public String getEmail(){
        
        return email;
    }
    
    /**
    * Gets the availability from date.
    * @return the availability of the person
    */
    @Override
    public Date getFromDate(){
        
        return fromDate;
    }
    
    /**
    * Gets the availability to date.
    * @return the toDate of the availability
    */
    @Override
     public Date getToDate(){
        
        return toDate;
    }
     
    /**
    * Gets the competence name.
    * @return the name of the competence
    */
    @Override
     public List<CompetenceList> getCompetence(){
        
        return competence;
    }
      
    /**
    * Gets the gets Years Of Experience for competence.
    * @return the Years Of Experience of the competence
    */
    @Override
     public Double getYearsOfExperience(){
        
        return yearsOfExperience;
    }// **** End of getters **//
     
    
     //*********** Here where all setters methods starts    ***/ 
    
    /**
    * A method used to save the name of the person
    *
    * @param name  the name of the person.
    */
    @Override   
    public void setName(String name){
        
        this.name =  name;
    }
    
    /**
    * A method used to save the surname of the person
    *
    * @param surname  the surname of the person.
    */
    @Override
    public void setSurname(String surname){
        
        this.surname = surname;
    }
     
    /**
    * A method used to save the SSN of the person
    *
    * @param ssn 
    */
    @Override
    public void setSSN(String ssn){
        
         this.ssn = ssn;
    }
    
    /**
    * A method used to save the email of the person
    *
    * @param email  the email of the person.
    */
    @Override
    public void setEmail(String email){
        
         this.email = email;
    }
    
    /**
    * A method used to save the fromDate of the availability 
    *
    * @param fromDate  the date of the availability.
    */
    @Override
    public void setFromDate(Date fromDate){
        
         this.fromDate = fromDate;
    }
    
    /**
    * A method used to save the toDate of the availability 
    *
    * @param toDate  the date of the availability.
    */
    @Override
    public void setToDate(Date toDate){
        
         this.toDate = toDate;
    }
    
    /**
    * A method used to save the competence of the person 
    *
    * @param competence  the competence of the person.
    */
    @Override
    public void setCompetence(List<CompetenceList> competence){
        
         this.competence = competence;
    }
    
  
    /**
    * A method used to save the yearsOFExperience of the competence 
    *
    * @param yearsOFExperience  the years OF Experience of the competence.
    */
    @Override
    public void setYearsOfExperience(Double yearsOFExperience){
        this.yearsOfExperience = yearsOFExperience;
    }
    
    /**
     *
     * @return
     */
    @Override
    public List<DateList>getDateList(){
        return dateList;
    }
    
    /**
     *
     * @param m
     */
    @Override
    public void setDateList(List<DateList> m){
        this.dateList = m;
    }
   
}
